﻿<Window x:Class="BOL.Apps.GeneNetworkBrowser.Windows.CompilationWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:converters="clr-namespace:BOL.Apps.GeneNetworkBrowser.Converters"
        xmlns:control="clr-namespace:BOL.Apps.GeneNetworkBrowser.Controls"
        WindowStartupLocation="CenterScreen"
        ResizeMode="NoResize"
        DataContext="{Binding RelativeSource={RelativeSource Self}}"
        Title="Compilation - Analysis" Height="394" Width="640">
    <Window.Resources>
        <converters:CheckAllConverter x:Key="CheckAllConverter" x:Shared="False"/>
    </Window.Resources>
    <StackPanel Margin="5">
        <TextBlock TextWrapping="Wrap">Compile a new gene relation database.</TextBlock>
        <ScrollViewer VerticalScrollBarVisibility="Visible" Height="294">
            <StackPanel>
                <GroupBox Header="Organisms">
                    <StackPanel>
                        <DockPanel Margin="5">
                            <TextBlock TextWrapping="Wrap" VerticalAlignment="Center" Margin="0,0,5,0">Select an organism:</TextBlock>
                            <ComboBox Name="_cbOrganism">
                                <ComboBoxItem Tag="3702">Arabidopsis thaliana</ComboBoxItem>
                                <ComboBoxItem Tag="9913">Bos taurus</ComboBoxItem>
                                <ComboBoxItem Tag="6239">Caenorhabditis elegans</ComboBoxItem>
                                <ComboBoxItem Tag="3055">Chlamydomonas reinhardtii</ComboBoxItem>
                                <ComboBoxItem Tag="7955">Danio rerio (zebrafish)</ComboBoxItem>
                                <ComboBoxItem Tag="44689">Dictyostelium discoideum</ComboBoxItem>
                                <ComboBoxItem Tag="7227">Drosophila melanogaster</ComboBoxItem>
                                <ComboBoxItem Tag="562">Escherichia coli</ComboBoxItem>
                                <ComboBoxItem Tag="11103">Hepatitis C virus</ComboBoxItem>
                                <ComboBoxItem Tag="9606" IsSelected="True">Homo sapiens</ComboBoxItem>
                                <ComboBoxItem Tag="148305">Magnaporthe grisea</ComboBoxItem>
                                <ComboBoxItem Tag="10090">Mus musculus</ComboBoxItem>
                                <ComboBoxItem Tag="2104">Mycoplasma pneumoniae</ComboBoxItem>
                                <ComboBoxItem Tag="5141">Neurospora crassa</ComboBoxItem>
                                <ComboBoxItem Tag="4530">Oryza sativa</ComboBoxItem>
                                <ComboBoxItem Tag="5833">Plasmodium falciparum</ComboBoxItem>
                                <ComboBoxItem Tag="10116">Rattus norvegicus</ComboBoxItem>
                                <ComboBoxItem Tag="4932">Saccharomyces cerevisiae</ComboBoxItem>
                                <ComboBoxItem Tag="4896">Schizosaccharomyces pombe</ComboBoxItem>
                                <ComboBoxItem Tag="31033">Takifugu rubripes</ComboBoxItem>
                                <ComboBoxItem Tag="8355">Xenopus laevis</ComboBoxItem>
                                <ComboBoxItem Tag="4577">Zea mays</ComboBoxItem>
                            </ComboBox>
                        </DockPanel>
                    </StackPanel>
                </GroupBox>
                <GroupBox Header="Sources">
                    <StackPanel>
                        <DockPanel Margin="5">
                            <TextBlock VerticalAlignment="Center" TextWrapping="Wrap">Search for highly probable sub-networks of given size.</TextBlock>
                        </DockPanel>
                        <StackPanel Margin="20,5,0,0">
                            <TextBlock>Select All</TextBlock>
                            <CheckBox Padding="5 0 15 0" Name="_cbDatabaseAll" Content="All">
                                <CheckBox.IsChecked>
                                    <MultiBinding Converter="{StaticResource CheckAllConverter}">
                                        <Binding ElementName="_cbDatabaseGXPCC" Path="IsChecked" />
                                        <Binding ElementName="_cbDatabaseGXPCC" Path="IsEnabled" Mode="OneWay"/>
                                        <Binding ElementName="_cbDatabaseGXMI" Path="IsChecked" />
                                        <Binding ElementName="_cbDatabaseGXMI" Path="IsEnabled" Mode="OneWay"/>
                                        <Binding ElementName="_cbDatabaseLitNLP" Path="IsChecked" />
                                        <Binding ElementName="_cbDatabaseLitNLP" Path="IsEnabled" Mode="OneWay"/>
                                        <Binding ElementName="_cbDatabaseLitNCBI" Path="IsChecked" />
                                        <Binding ElementName="_cbDatabaseLitNCBI" Path="IsEnabled" Mode="OneWay"/>
                                        <Binding ElementName="_cbDatabaseLitComentioned" Path="IsChecked" />
                                        <Binding ElementName="_cbDatabaseLitComentioned" Path="IsEnabled" Mode="OneWay"/>
                                        <Binding ElementName="_cbDatabasePPIHPRD" Path="IsChecked" />
                                        <Binding ElementName="_cbDatabasePPIHPRD" Path="IsEnabled" Mode="OneWay"/>
                                        <Binding ElementName="_cbDatabasePPIIntAct" Path="IsChecked" />
                                        <Binding ElementName="_cbDatabasePPIIntAct" Path="IsEnabled" Mode="OneWay"/>
                                        <Binding ElementName="_cbDatabasePPIMIPS" Path="IsChecked" />
                                        <Binding ElementName="_cbDatabasePPIMIPS" Path="IsEnabled" Mode="OneWay"/>
                                        <Binding ElementName="_cbDatabasePPIMINT" Path="IsChecked" />
                                        <Binding ElementName="_cbDatabasePPIMINT" Path="IsEnabled" Mode="OneWay"/>
                                        <Binding ElementName="_cbDatabasePPIDIP" Path="IsChecked" />
                                        <Binding ElementName="_cbDatabasePPIDIP" Path="IsEnabled" Mode="OneWay"/>
                                        <Binding ElementName="_cbDatabasePPIREACTOME" Path="IsChecked" />
                                        <Binding ElementName="_cbDatabasePPIREACTOME" Path="IsEnabled" Mode="OneWay"/>
                                        <Binding ElementName="_cbDatabasePPIKEGG" Path="IsChecked" />
                                        <Binding ElementName="_cbDatabasePPIKEGG" Path="IsEnabled" Mode="OneWay"/>
                                        <Binding ElementName="_cbDatabaseTFPANTHER" Path="IsChecked" />
                                        <Binding ElementName="_cbDatabaseTFPANTHER" Path="IsEnabled" Mode="OneWay"/>
                                        <Binding ElementName="_cbDatabaseTFJASPAR" Path="IsChecked" />
                                        <Binding ElementName="_cbDatabaseTFJASPAR" Path="IsEnabled" Mode="OneWay"/>
                                        <Binding ElementName="_cbDatabaseTFKEGG" Path="IsChecked" />
                                        <Binding ElementName="_cbDatabaseTFKEGG" Path="IsEnabled" Mode="OneWay"/>
                                        <Binding ElementName="_cbDatabaseTFPAP" Path="IsChecked" />
                                        <Binding ElementName="_cbDatabaseTFPAP" Path="IsEnabled" Mode="OneWay"/>
                                    </MultiBinding>
                                </CheckBox.IsChecked>
                            </CheckBox>
                            <TextBlock>Gene expression</TextBlock>
                            <WrapPanel>
                                <CheckBox Padding="5 0 15 0" Name="_cbDatabaseGXAll" Content="All">
                                    <CheckBox.IsChecked>
                                        <MultiBinding Converter="{StaticResource CheckAllConverter}">
                                            <Binding ElementName="_cbDatabaseGXPCC" Path="IsChecked" />
                                            <Binding ElementName="_cbDatabaseGXPCC" Path="IsEnabled" Mode="OneWay"/>
                                            <Binding ElementName="_cbDatabaseGXMI" Path="IsChecked" />
                                            <Binding ElementName="_cbDatabaseGXMI" Path="IsEnabled" Mode="OneWay"/>
                                        </MultiBinding>
                                    </CheckBox.IsChecked>
                                </CheckBox>
                                <CheckBox Padding="5 0 15 0" IsChecked="True" Name="_cbDatabaseGXPCC">Pearson correlation coefficient</CheckBox>
                                <CheckBox Padding="5 0 15 0" IsChecked="True" Name="_cbDatabaseGXMI">Mutual information</CheckBox>
                            </WrapPanel>
                            <TextBlock>Literature</TextBlock>
                            <WrapPanel>
                                <CheckBox Padding="5 0 15 0" Name="_cbDatabaseLitAll" Content="All">
                                    <CheckBox.IsChecked>
                                        <MultiBinding Converter="{StaticResource CheckAllConverter}">
                                            <Binding ElementName="_cbDatabaseLitNLP" Path="IsChecked" />
                                            <Binding ElementName="_cbDatabaseLitNLP" Path="IsEnabled" Mode="OneWay"/>
                                            <Binding ElementName="_cbDatabaseLitNCBI" Path="IsChecked" />
                                            <Binding ElementName="_cbDatabaseLitNCBI" Path="IsEnabled" Mode="OneWay"/>
                                            <Binding ElementName="_cbDatabaseLitComentioned" Path="IsChecked" />
                                            <Binding ElementName="_cbDatabaseLitComentioned" Path="IsEnabled" Mode="OneWay"/>
                                        </MultiBinding>
                                    </CheckBox.IsChecked>
                                </CheckBox>
                                <CheckBox Padding="5 0 15 0" IsChecked="True" Name="_cbDatabaseLitNLP">Natural language processing</CheckBox>
                                <CheckBox Padding="5 0 15 0" IsChecked="True" Name="_cbDatabaseLitNCBI">NCBI curated</CheckBox>
                                <CheckBox Padding="5 0 15 0" IsChecked="True" Name="_cbDatabaseLitComentioned">eUtil commentioned</CheckBox>
                            </WrapPanel>
                            <TextBlock>Protein-protein interaction</TextBlock>
                            <StackPanel>
                                <CheckBox Padding="5 0 15 0" Name="_cbDatabasePPIAll" Content="All">
                                    <CheckBox.IsChecked>
                                        <MultiBinding Converter="{StaticResource CheckAllConverter}">
                                            <Binding ElementName="_cbDatabasePPIHPRD" Path="IsChecked" />
                                            <Binding ElementName="_cbDatabasePPIHPRD" Path="IsEnabled" Mode="OneWay"/>
                                            <Binding ElementName="_cbDatabasePPIIntAct" Path="IsChecked" />
                                            <Binding ElementName="_cbDatabasePPIIntAct" Path="IsEnabled" Mode="OneWay"/>
                                            <Binding ElementName="_cbDatabasePPIMIPS" Path="IsChecked" />
                                            <Binding ElementName="_cbDatabasePPIMIPS" Path="IsEnabled" Mode="OneWay"/>
                                            <Binding ElementName="_cbDatabasePPIMINT" Path="IsChecked" />
                                            <Binding ElementName="_cbDatabasePPIMINT" Path="IsEnabled" Mode="OneWay"/>
                                            <Binding ElementName="_cbDatabasePPIDIP" Path="IsChecked" />
                                            <Binding ElementName="_cbDatabasePPIDIP" Path="IsEnabled" Mode="OneWay"/>
                                            <Binding ElementName="_cbDatabasePPIREACTOME" Path="IsChecked" />
                                            <Binding ElementName="_cbDatabasePPIREACTOME" Path="IsEnabled" Mode="OneWay"/>
                                            <Binding ElementName="_cbDatabasePPIKEGG" Path="IsChecked" />
                                            <Binding ElementName="_cbDatabasePPIKEGG" Path="IsEnabled" Mode="OneWay"/>
                                        </MultiBinding>
                                    </CheckBox.IsChecked>
                                </CheckBox>
                                <StackPanel Orientation="Horizontal">
                                    <CheckBox Padding="5 0 15 0" IsChecked="True" Name="_cbDatabasePPIHPRD" Content="HPRD" VerticalAlignment="Center" />
                                    <Image Source="/GeneNetworkBrowser;component/Images/Logo_HPRD.png" Width="100" Height="30" />
                                    <Grid>
                                        <ProgressBar Name="_pbDatabasePPIHPRD" Width="200" Height="22" Margin="5,0,5,0" />
                                        <TextBox Name="_tbDatabasePPIHPRD" Background="#00ffffff" />
                                    </Grid>
                                    <Button Width="100" Height="22" Content="Download" />
                                </StackPanel>
                                <DockPanel>
                                    <CheckBox Padding="5 0 15 0" IsChecked="True" Name="_cbDatabasePPIIntAct">IntAct</CheckBox>
                                </DockPanel>
                                <DockPanel>
                                    <CheckBox Padding="5 0 15 0" IsChecked="True" Name="_cbDatabasePPIMIPS">MIPS</CheckBox>
                                </DockPanel>
                                <DockPanel>
                                    <CheckBox Padding="5 0 15 0" IsChecked="True" Name="_cbDatabasePPIMINT">MINT</CheckBox>
                                </DockPanel>
                                <DockPanel>
                                    <CheckBox Padding="5 0 15 0" IsChecked="True" Name="_cbDatabasePPIDIP">DIP</CheckBox>
                                </DockPanel>
                                <DockPanel>
                                    <CheckBox Padding="5 0 15 0" IsChecked="True" Name="_cbDatabasePPIREACTOME">REACTOME</CheckBox>
                                </DockPanel>
                                <DockPanel>
                                    <CheckBox Padding="5 0 15 0" IsChecked="True" Name="_cbDatabasePPIKEGG">KEGG</CheckBox>
                                </DockPanel>
                            </StackPanel>
                            <TextBlock>Transcription factor - target gene</TextBlock>
                            <WrapPanel>
                                <CheckBox Padding="5 0 15 0" Name="_cbDatabaseTFAll" Content="All">
                                    <CheckBox.IsChecked>
                                        <MultiBinding Converter="{StaticResource CheckAllConverter}">
                                            <Binding ElementName="_cbDatabaseTFPANTHER" Path="IsChecked" />
                                            <Binding ElementName="_cbDatabaseTFPANTHER" Path="IsEnabled" Mode="OneWay"/>
                                            <Binding ElementName="_cbDatabaseTFJASPAR" Path="IsChecked" />
                                            <Binding ElementName="_cbDatabaseTFJASPAR" Path="IsEnabled" Mode="OneWay"/>
                                            <Binding ElementName="_cbDatabaseTFKEGG" Path="IsChecked" />
                                            <Binding ElementName="_cbDatabaseTFKEGG" Path="IsEnabled" Mode="OneWay"/>
                                            <Binding ElementName="_cbDatabaseTFPAP" Path="IsChecked" />
                                            <Binding ElementName="_cbDatabaseTFPAP" Path="IsEnabled" Mode="OneWay"/>
                                        </MultiBinding>
                                    </CheckBox.IsChecked>
                                </CheckBox>
                                <CheckBox Padding="5 0 15 0" IsChecked="True" Name="_cbDatabaseTFPANTHER">Panther</CheckBox>
                                <CheckBox Padding="5 0 15 0" IsChecked="True" Name="_cbDatabaseTFJASPAR">JASPAR</CheckBox>
                                <CheckBox Padding="5 0 15 0" IsChecked="True" Name="_cbDatabaseTFKEGG">KEGG</CheckBox>
                                <CheckBox Padding="5 0 15 0" IsChecked="True" Name="_cbDatabaseTFPAP">PAP</CheckBox>
                            </WrapPanel>
                        </StackPanel>
                    </StackPanel>
                </GroupBox>
                <GroupBox Header="Output">
                    <DockPanel>
                        <TextBlock VerticalAlignment="Center" TextWrapping="Wrap" Margin="0,0,5,0">Select a database name:</TextBlock>
                        <TextBox Name="_tbDatabaseName" />
                        <Button Name="_btnBrowse" Content="Browse..." Width="80" />
                    </DockPanel>
                </GroupBox>
            </StackPanel>
        </ScrollViewer>
        <Separator Margin="0,5,0,5"/>
        <WrapPanel HorizontalAlignment="Right">
            <CheckBox Name="_cbOpenSubNetworks" IsChecked="True" Margin="0,0,50,0" VerticalAlignment="Center">Open sub-networks as a new document.</CheckBox>
            <Button IsDefault="True" Margin="0,0,5,0" Content="OK" />
            <Button IsCancel="True" Content="Cancel" />
        </WrapPanel>
    </StackPanel>
</Window>
